package com.pingan.agentbank.aaos.task;

import com.pingan.agentbank.aaos.pojo.Config;
import com.pingan.agentbank.aaos.service.DataInDBService;
import com.pingan.vframe.db.DBName;
import com.pingan.vframe.db.DBTask;
import com.pingan.vframe.lang.Inject;
import com.pingan.vframe.logging.Log;
import com.pingan.vframe.logging.LogFactory;

import java.util.List;

@DBName("defaultdb")
public class InDataBaseTask extends DBTask {

    private final Log log = LogFactory.getLog();

    private Config config;

    public Config getConfig() {
        return config;
    }

    public void setConfig(Config config) {
        this.config = config;
    }

    @Inject
    DataInDBService dataInDBService;

    @Override
    protected void execute() throws InterruptedException {

        //中断续传
        dataInDBService.resume(config);
        //正常执行
        dataInDBService.perform(config);
    }

}
